
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

///---------------
/// @name ACRouter
///---------------

typedef NS_ENUM (NSInteger, ACRouteType) {
    ACRouteTypeNone = 0,
    ACRouteTypeViewController = 1,
    ACRouteTypeBlock = 2
};

typedef id (^ACRouterBlock)(NSDictionary *params);

@interface ACRouter : NSObject

+ (instancetype)shareRouter;

+ (void)map:(NSString *)route toControllerClass:(Class)controllerClass;
- (UIViewController *)match:(NSString *)route __attribute__((deprecated));
- (UIViewController *)matchController:(NSString *)route;
- (void)map:(NSString *)route toBlock:(ACRouterBlock)block;
- (ACRouterBlock)matchBlock:(NSString *)route;
- (id)callBlock:(NSString *)route;
- (ACRouteType)canRoute:(NSString *)route;


+ (void)push:(NSString*)params;
+ (void)push:(NSString*)str WithParameters:(NSDictionary*)params;

+ (void)present:(NSString*)params;


@end

///--------------------------------
/// @name UIViewController Category
///--------------------------------

@interface UIViewController (ACRoute)

@property (nonatomic, strong) NSDictionary *params;

@end
